<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>image viewer</title>
<link rel="stylesheet" href="viewer.min.css"/>
<script src="/plugins/jquery.js"></script>
<script src="viewer.min.js"></script>
</head>
<body>
	<img id="image" />
</body>
<script type="text/javascript">
	var getUrlKey = function (key) {
        var url = location.href;
        var v = '';
        var o = url.indexOf(key + "=");
        if (o != -1) {
            o += key.length + 1;
            e = url.indexOf("&", o);
            if (e == -1) {
                e = url.length;
            }
            //v = decodeURIComponent(url.substring(o, e));
            v = url.substring(o, e);
        }
        return v;
    }
	
	var file = decodeURIComponent(getUrlKey("file"));
	$("#image").attr("src", file);
	
	$("#image").viewer({
		"fullscreen" : false
	});
</script>
</html>